import {
	getProDeptTreeByLevelCode,
	getProDeptTreeByParentid,
	getProOrgTreeByParentid,
	getAllAuthForUser,
	getAllChildren,
	insertForStaff,
	updateForStaffBaseInfo,
  updateForStaffJobInfo,
  updateForStaffJobGradeInfo,
  updateForStaffPATJobInfo,
  updateForStaffPoliceRankInfo,
  updateForStaffEduInfo,
  updateForStaffTrainInfo,
  updateForStaffCheckInfo,
  updateForStaffCurriculumInfo,
  updateForStaffFamilyMemberInfo,
  updateForStaffDisciplineInfo,
	updateForStaffContactInfo,
	updateForStaffAccountInfo,
	updateForStaffEducationInfo,
	updateForStaffWorkInfo,
	updateForStaffTrainInfo1,
	updateForStaffCertificateInfo,
	queryPageForProStaff,
	getAllStaffInfo,
  insertForStaffJobInfo,
  insertForStaffJobGradeInfo,
  insertForStaffPATJobInfo,
  insertForStaffPoliceRankInfo,
  insertForStaffEduInfo,
  insertForStaffTrainInfo,
  insertForStaffCheckInfo,
  insertForStaffCurriculumInfo,
  insertForStaffFamilyMemberInfo,
  insertForStaffDisciplineInfo,
	insertForStaffEducationInfo,
	insertForStaffWorkInfo,
	insertForStaffTrainInfo1,
	insertForStaffCertificateInfo,
  deleteForStaffJobInfo,
  deleteForStaffJobGradeInfo,
  deleteForStaffPATJobInfo,
  deleteForStaffPoliceRankInfo,
  deleteForStaffEduInfo,
  deleteForStaffTrainInfo,
  deleteForStaffCheckInfo,
  deleteForStaffCurriculumInfo,
  deleteForStaffFamilyMemberInfo,
  deleteForStaffDisciplineInfo,
	deleteForStaffEducationInfo,
	deleteForStaffWorkInfo,
	deleteForStaffTrainInfo1,
	deleteForStaffCertificateInfo,
	deleteByPrimaryKeyForProStaff,
	upLoadListPersonInformation,
	getAllPostForUser,
  getJobInfo,
  getJobGradeInfo,
  getPATJobInfo,
  getPoliceRankInfo,
  getEduInfo,
  getTrainInfo,
  getCheckInfo,
  getCurriculumInfo,
  getFamilyMemberInfo,
  getDisciplineInfo,
  uploadImage,

} from '@/services/business/api_staff';

export default {
    namespace: 'prostaff',

    state: {
        data: {
            list: [],
            pagination: {},
        },
        authForUser: {
        	list:[],
        },
        selectDeptTree: {
        	list:[],
        },
        cascaderList: {
        	list: [],
        },
        staffInfo: {
        	datarecord:{},
        },
        postForUser: {
        	list:[],
        },
        jobInfoList:{
        	datarecord:{},
        },
    },

    effects: {
            *get_prodepttree_by_levelcode({ payload, callback }, { call, put }) {
                const response = yield call(getProDeptTreeByLevelCode, payload);
                yield put({
                    type: 'getProDeptTreeByLevelCode',
                    payload: response,
                });

                if (callback) callback();
            },
            *get_prodepttree_by_parentid({ payload, callback }, { call, put }) {
                const response = yield call(getProDeptTreeByParentid, payload);
                yield put({
                    type: 'getProDeptTreeByParentid',
                    payload: response,
                });

                if (callback) callback(response);
            },
            *get_all_auth_for_user({ payload, callback }, { call, put }) {
                const response = yield call(getAllAuthForUser, payload);
                yield put({
                    type: 'getAllAuthForUser',
                    payload: response,
                });

                if (callback) callback(response);
            },
            *get_all_city({ payload, callback }, { call, put }) {
                const response = yield call(getAllChildren, payload);
                yield put({
                    type: 'getAllCity',
                    payload: response,
                });

                if (callback) callback(response);
            },
            *get_for_staff_jobInfo({ payload, callback }, { call, put }) {
                const response = yield call(getJobInfo, payload);
                /* yield put({
                    type: 'getJobInfo',
                    payload: response,
                }); */

                 if (callback) callback(response);
            },
            *get_for_staff_jobGradeInfo({ payload, callback }, { call, put }) {
                const response = yield call(getJobGradeInfo, payload);
                /* yield put({
                    type: 'getJobGradeInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_pATJobInfo({ payload, callback }, { call, put }) {
                const response = yield call(getPATJobInfo, payload);
                /* yield put({
                    type: 'getPATJobInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_policeRankInfo({ payload, callback }, { call, put }) {
                const response = yield call(getPoliceRankInfo, payload);
                /* yield put({
                    type: 'getPoliceRankInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_eduInfo({ payload, callback }, { call, put }) {
                const response = yield call(getEduInfo, payload);
                /* yield put({
                    type: 'getEduInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_trainInfo({ payload, callback }, { call, put }) {
                const response = yield call(getTrainInfo, payload);
                /* yield put({
                    type: 'getTrainInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_checkInfo({ payload, callback }, { call, put }) {
                const response = yield call(getCheckInfo, payload);
                /* yield put({
                    type: 'getCheckInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_curriculumInfo({ payload, callback }, { call, put }) {
                const response = yield call(getCurriculumInfo, payload);
                /* yield put({
                    type: 'getCurriculumInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_familyMemberInfo({ payload, callback }, { call, put }) {
                const response = yield call(getFamilyMemberInfo, payload);
                /* yield put({
                    type: 'getFamilyMemberInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *get_for_staff_disciplineInfo({ payload, callback }, { call, put }) {
                const response = yield call(getDisciplineInfo, payload);
                /* yield put({
                    type: 'getDisciplineInfo',
                    payload: response,
                }); */

                if (callback) callback(response);
            },
            *insert_for_staff({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaff, payload);

                if (callback) callback(response);
            },
            *upload_list_personinformation({ payload, callback }, { call, put }) {
                const response = yield call(upLoadListPersonInformation, payload);
								const responseData = yield call(queryPageForProStaff, {});
                yield put({
                    type: 'queryPageForProStaff',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_baseinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffBaseInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_jobInfo({ payload, callback }, { call, put }) {
              console.log(payload)
                const response = yield call(updateForStaffJobInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_jobGradeInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffJobGradeInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_pATJobInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffPATJobInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_policeRankInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffPoliceRankInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_eduInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffEduInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_trainInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffTrainInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_checkInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffCheckInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_curriculumInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffCurriculumInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_familyMemberInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffFamilyMemberInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_disciplineInfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffDisciplineInfo, payload);
                const newPayload = {za0100: payload.formdata.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_contactinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffContactInfo, payload);
								const newPayload = {punid: payload.id};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_accountinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffAccountInfo, payload);
								const newPayload = {punid: payload.id};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_jobInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffJobInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_jobGradeInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffJobGradeInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_pATJobInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffPATJobInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_policeRankInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffPoliceRankInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_eduInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffEduInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_trainInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffTrainInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_checkInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffCheckInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_curriculumInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffCurriculumInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_familyMemberInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffFamilyMemberInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_disciplineInfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffDisciplineInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_educationinfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffEducationInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_educationinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffEducationInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_jobInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffJobInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_jobGradeInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffJobGradeInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_pATJobInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffPATJobInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_policeRankInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffPoliceRankInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_eduInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffEduInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_trainInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffTrainInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_checkInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffCheckInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_curriculumInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffCurriculumInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_familyMemberInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffFamilyMemberInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_disciplineInfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffDisciplineInfo, payload);
            		const newPayload = {za0100: payload.za0100};
            		const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_educationinfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffEducationInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_workinfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffWorkInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_workinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffWorkInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_workinfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffWorkInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_traininfo1({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffTrainInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_traininfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffTrainInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_traininfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffTrainInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *insert_for_staff_certificateinfo({ payload, callback }, { call, put }) {
                const response = yield call(insertForStaffCertificateInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *update_for_staff_certificateinfo({ payload, callback }, { call, put }) {
                const response = yield call(updateForStaffCertificateInfo, payload);
								const newPayload = {za0100: payload.za0100};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *delete_for_staff_certificateinfo({ payload, callback }, { call, put }) {
                const response = yield call(deleteForStaffCertificateInfo, payload);
								const newPayload = {punid: payload.punid};
								const responseData = yield call(getAllStaffInfo, newPayload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: responseData,
                });
                if (callback) callback(response);
            },
            *query_page_for_prostaff({ payload, callback }, { call, put }) {
                const response = yield call(queryPageForProStaff, payload);
                yield put({
                    type: 'queryPageForProStaff',
                    payload: response,
                });

                if (callback) callback();
            },
            *get_all_staff_info({ payload, callback }, { call, put }) {
                const response = yield call(getAllStaffInfo, payload);
                yield put({
                    type: 'getAllStaffInfo',
                    payload: response,
                });

                if (callback) callback();
            },
            *delete_by_primarykey_for_prostaff({ payload, callback }, { call, put }) {
                const response = yield call(deleteByPrimaryKeyForProStaff, payload);

								const newPayload = {currentPage: payload.currentPage,pageSize: payload.pageSize};
                const responsedata = yield call(queryPageForProStaff, newPayload);
                yield put({
	                type: 'queryPageForProStaff',
	                payload: responsedata,
                });
				if (callback) callback(response);
            },
            *get_all_post_for_user({ payload, callback }, { call, put }) {
                const response = yield call(getAllPostForUser, payload);
                yield put({
                    type: 'getAllPostForUser',
                    payload: response,
                });

                if (callback) callback(response);
            },
            *upload_uploadImage({ payload, callback }, { call, put }) {
                const response = yield call(uploadImage, payload);
                console.log(response)
                yield put({
                    type: 'uploadImage',
                    payload: response,
                });

                if (callback) callback(response);
            },
    },

    reducers: {
        getProDeptTreeByLevelCode(state, action) {
            return {
                ...state,
                selectDeptTree: action.payload,
            };
        },
        getProDeptTreeByParentid(state, action) {
            return {
                ...state,
                selectDeptTree: action.payload,
            };
        },
        getAllAuthForUser(state, action) {
            return {
                ...state,
                authForUser: action.payload,
            };
        },
        getAllCity(state, action) {
            return {
                ...state,
                cascaderList: action.payload,
            };
        },
        getJobInfo(state, action) {
            return {
                ...state,
                jobInfoList: action.payload,
            };
        },
        getJobGradeInfo(state, action) {
            return {
                ...state,
                jobGradeInfoList: action.payload,
            };
        },
        getPATJobInfo(state, action) {
            return {
                ...state,
                pATJobInfoList: action.payload,
            };
        },
        getPoliceRankInfo(state, action) {
            return {
                ...state,
                policeRankInfoList: action.payload,
            };
        },
        getEduInfo(state, action) {
            return {
                ...state,
                eduInfoList: action.payload,
            };
        },
        getTrainInfo(state, action) {
            return {
                ...state,
                trainInfoList: action.payload,
            };
        },
        getCheckInfo(state, action) {
            return {
                ...state,
                checkInfoList: action.payload,
            };
        },
        getCurriculumInfo(state, action) {
            return {
                ...state,
                curriculumInfoList: action.payload,
            };
        },
        getFamilyMemberInfo(state, action) {
            return {
                ...state,
                familyMemberInfoList: action.payload,
            };
        },
        getDisciplineInfo(state, action) {
            return {
                ...state,
                disciplineInfoList: action.payload,
            };
        },
        queryPageForProStaff(state, action) {
            return {
                ...state,
                data: action.payload,
            };
        },
        getAllStaffInfo(state, action) {
            return {
                ...state,
                staffInfo: action.payload,
            };
        },
        getAllPostForUser(state, action) {
            return {
                ...state,
                postForUser: action.payload,
            };
        },
    },
};
